package com.lagou.edu.config;

import com.lagou.edu.service.StudentService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {
@Bean  //将返回值对象作为左键添加到Spring容器中，该组件的id默认为方法名
    public StudentService studentService(){
        return new StudentService();
    }
}
